package com.itheima.com.单列模式;

import cn.hutool.core.lang.Singleton;

public class Singleton1 {
    //私有构造
    private Singleton1() {
        System.out.println("private Singleton1()");
    }

    private static final Singleton1 INSTANCE = new Singleton1();


    public static Singleton1 getInstance() {
        return INSTANCE;
    }

    public static void otherMethod() {
        System.out.println("otherMethod()");
    }

    public Object readResolve() {
        return INSTANCE;
    }
}
